package com.system.elastic.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

import javax.persistence.Column;

/**
 *
 * @TableName goods
 */
@TableName(value ="goods")
@Data
public class Goods implements Serializable {
    /**
     * 商品id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 商品标题
     */
    @Column(name = "goods_title")
    private String goodsTitle;

    /**
     * 商品名称
     */
    @Column(name = "goods_name")
    private String goodsName;

    /**
     * 商品图片
     */
    @Column(name = "goods_img")
    private String goodsImg;

    /**
     * 商品详情介绍
     */
    @Column(name = "goods_detail")
    private String goodsDetail;

    /**
     * 商品单价
     */
    @Column(name = "goods_price")
    private BigDecimal goodsPrice;

    /**
     * 商品库存，-1表示无限
     */
    @Column(name = "goods_stock")
    private Integer goodsStock;

    /**
     * 商品状态 1普通商品，2参与秒杀
     */
    @Column(name = "status")
    private Integer status;

    /**
     * 是否锁定，1：未锁定，2：锁定
     */
    @Column(name = "islock")
    private Integer islock;

    /**
     * 秒杀数量
     */
    @Column(name = "seckill_num")
    private Integer seckillNum;

    /**
     * 秒杀价格
     */
    @Column(name = "seckill_price")
    private BigDecimal seckillPrice;

    /**
     * 库存预警数量
     */
    @Column(name = "goods_alert_stock")
    private String goodsAlertStock;

    /**
     * 秒杀开始时间
     */
    @Column(name = "seckill_begin")
    private Date seckillBegin;

    /**
     * 秒杀结束时间
     */
    @Column(name = "seckill_end")
    private Date seckillEnd;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
